from appium.webdriver.common.mobileby import MobileBy
from appium.webdriver.webdriver import WebDriver

from appium_PO_test.page.add_member_page import AddMemberPage
from appium_PO_test.page.base_page import BasePage
from appium_PO_test.page.membermessage_page import DelMemberPage


class ContactListPage(BasePage):

    def goto_addmember(self):
        #click 添加成员
        self.swipe_find('添加成员').click()
        return AddMemberPage(self.driver)

    def goto_delmember(self):
        self.find(MobileBy.XPATH,"//*[@resource-id='com.tencent.wework:id/dyi'][5]").click()
        self.find(MobileBy.XPATH,"//*[@resource-id='com.tencent.wework:id/h8g']").click()
        return DelMemberPage(self.driver)

    def turn_contactlist(self):
        pass